In the previous lesson, we understood selectors, their types, and
selector editor. Let's now, learn more about
selectors and understand UI Explorer in this video,
so let's get started. UI Explorer is an advanced tool for customizing the selector. It enables the user to create a custom selector for
a specific UI element. To open the UI Explorer window, click the "UI Explorer"
button in the design tab. Alternatively, the
UI Explorer can be launched from the tools tab in the backstage view of studio. When UI Explorer opens, you can see validate,
indicate element, indicate anchor,
repair, highlight, and options buttons
on top of the screen. You can also see four
panels, visual tree, selector editor, selector attributes,
and property explorer. Now, let's understand
each one in detail. The validate button shows
whether a selector is valid. If it is green, it means
that the selector is valid. If it is red, it means
that the selector is invalid and if it is yellow, it means you should
re-validate the selector. The indicate element
button is used to indicate a new UI element to
replace the previous one. The indicate anchor
button enables you to choose an anchor relative
to the target UI element. The repair button enables
you to re indicate the same target UI element
and repair the selector. The highlight button brings the target element
in the foreground. The highlight stays on
until it's switched off. The button is enabled only
if the selector is valid. The visual tree panel
displays a tree of the user interface hierarchy and enables you to navigate
through various options. You can see the items
in alphabetical order. When you double-click a UI
element from the visual tree, you can access selector editor, select our attributes,
and property explorer. The bottom part of
the panel displays the actual XML fragment that you have to
use in a project. Once you find the
selector you want, you can copy it from
here and paste it in the properties panel of an activity in the
selector field. The top part of the panel
enables you to view all the nodes in a selector and eliminate the ones that are unnecessary by clearing the
check box in front of them. Selecting a node here
displays its attributes in the select attributes and
property explorer panels. The selector attributes
panel displays all the available attributes
of a selected node. You can add or eliminate
some node attributes by selecting or clearing
the check box in front of each attribute. The property explorer
panel displays all the attributes that is
specified UI object can have, including the ones that do
not appear in the selector. Whenever you work
with selectors, you can always use the
UI Explorer to learn how selectors work and
that's it for this video. Next in this lesson are
two reading materials. First on UI Explorer, which we'll explain
the different panels in it and the second is about UI frameworks.
Thank you for watching.